Skip to content

Add claude GitHub actions 1780848545607#192

Open
dalang059 wants to merge 10 commits into
https-deeplearning-ai:mainfrom
dalang059:add-claude-github-actions-1780848545607
Open

Add claude GitHub actions 1780848545607#192
dalang059 wants to merge 10 commits into
https-deeplearning-ai:mainfrom
dalang059:add-claude-github-actions-1780848545607

Conversation

@dalang059

Copy link
Copy Markdown

No description provided.

dalang059 and others added 10 commits May 23, 2026 23:50
Reduce CHUNK_SIZE from 800 to 500 to stay within the embedding model's
256-token window, preventing silent truncation. Increase MAX_RESULTS from
5 to 8 to maintain retrieval coverage with the smaller chunks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add fixed-position circular toggle button (top-right) with sun/moon SVG icons
- Add [data-theme=light] CSS variable overrides: light gray/white surfaces,
  dark slate text, same blue primary, adjusted shadows and focus rings
- Swap code block backgrounds from hardcoded rgba values to --code-bg variable
  so they adapt correctly in both themes
- Add .theme-transitioning class for smooth 300ms color transitions on toggle
- Persist theme choice to localStorage; restore on page load (defaults to dark)
- Add black and ruff as dev dependencies in pyproject.toml
- Configure [tool.black] (line-length 88, py313 target) and [tool.ruff.lint]
  (E/F/I rules, E501 ignored, E402 per-file ignore for app.py where
  warnings.filterwarnings must precede imports)
- Apply black formatting across all 13 Python source files
- Fix 29 ruff issues: unsorted imports, unused imports, duplicate StaticFiles
  import in app.py, and move stray FileResponse import to top of app.py
- Add scripts/format.sh (applies black + ruff --fix in-place)
- Add scripts/lint.sh (check-only mode for CI / pre-commit use)
- Add backend/tests/test_api_endpoints.py with 18 tests covering all three
  FastAPI endpoints (POST /api/query, GET /api/courses, DELETE /api/session/{id}).
  Tests verify status codes, response body fields, session auto-creation vs
  reuse, input validation (422 on missing query), and 500 error propagation.

- Extend backend/tests/conftest.py with shared API test infrastructure:
  _build_test_api_app() builds a minimal FastAPI app mirroring app.py routes
  with an injected rag_system, avoiding the static-file mount and ChromaDB
  init that prevent direct app.py import in tests.
  mock_rag_system fixture provides a pre-configured MagicMock.
  api_client fixture wires TestClient to the test app.

- Add [tool.pytest.ini_options] to pyproject.toml (testpaths, pythonpath,
  addopts) so `uv run pytest` works from the project root without extra args.

- Add httpx>=0.28 to dev dependencies (required by starlette TestClient
  in starlette 0.46+ / FastAPI 0.116+).
# Conflicts:
#	pyproject.toml
#	uv.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant